#region License Revision: 0 Last Revised: 6/18/2008 11:00 AM
/******************************************************************************
Copyright (c) Microsoft Corporation.  All rights reserved.


This file is licensed under the Microsoft Public License (Ms-PL). A copy of the Ms-PL should accompany this file. 
If it does not, you can obtain a copy from: 

http://www.microsoft.com/resources/sharedsource/licensingbasics/publiclicense.mspx
******************************************************************************/
#endregion // License
using System;
using System.Windows.Browser;
using System.Diagnostics;
using ScriptInterop;

namespace VIEWS // Virtual Earth Wrapper
{

/// <summary>A location used to interpolate a found result for a location search.</summary>
public class VEGeocodeLocation : JSObject
{
	/// <summary>String holding JavaScript class name</summary>
	private static string thisClass = "VEGeocodeLocation";
	
	/// <summary>Get the JavaScript class name</summary>
	/// <returns type="String">The class name used in JavaScript </returns>		
	public override string ClassName
	{
		get { return thisClass; }
	}

	/// <summary>Construct a C# wrapper from a ScriptObject</summary>
	/// <param name="so">A ScriptObjet from JScript.</param>
	public VEGeocodeLocation(ScriptObject so) : base(so) { }

	/// <summary>Construct an empty C# wrapper from a ScriptObject</summary>
	public VEGeocodeLocation() { }

	/// <summary>A location used to interpolate a found result for a location search.</summary>
	/// <param name="latLong">A VELatLong Class object specifying the latitude and longitude of the location.</param>		
	/// <param name="precision">A VELocationPrecision Enumeration value specifying the precision of the location.</param> 
	public VEGeocodeLocation(VELatLong latLong, VELocationPrecision precision)
	{
		ScriptObject = CreateClass((ScriptObject)latLong, precision);
	}

	/// <summary name="LatLong">A VELatLong Class object specifying the latitude and longitude of the location.</summary>		
	public VELatLong LatLong
	{
		get { var so = GetProperty<ScriptObject>("LatLong"); return new VELatLong(so); }
		set { SetProperty("LatLong", (ScriptObject)value); }
	}
	/// <summary name="Precision">A VELocationPrecision Enumeration value specifying the precision of the location.</summary> 
	public VELocationPrecision Precision
	{
		get { return (VELocationPrecision)GetProperty<int>("Precision"); }
		set { SetProperty("Precision", (int)value); }
	}
} 

}
